package com.sky.module.system.Department.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sky.module.system.Department.domain.entity.Department;
import com.sky.module.system.Department.domain.vo.DepartmentQueryVO;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zsg
 * @since 2023-02-20
 */
public interface DepartmentService extends IService<Department> {

    /***
     * @description 查询部门列表
     * @param departmentQueryVO
     * @return java.util.List<com.zsg.entity.Department>
     * @date 2023/2/21 15:28
     *
     */
    List<Department> findDepartmentList(DepartmentQueryVO departmentQueryVO);

    /***
     * @description 查询上级部门列表
     *
     * @return java.util.List<com.zsg.entity.Department>
     * @date 2023/2/21 15:30
     *
     */
    List<Department> findParentDepartment();

    /***
     * @description 判断部门下是否有子部门
     *
     * @return boolean
     * @date 2023/2/22 10:29
     *
     */
    boolean hasChildrenOfDepartment(Long id);

    /***
     * @description 判断部门下是否有用户
     * @param id
     * @return boolean
     * @date 2023/2/22 10:42
     *
     */
    boolean hasUserOfDepartment(Long id);
}
